<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div class="app-header">
            <h1>手机登录/注册</h1>
        </div>
        <!-- mid -->
        <div class="app-mid">
            <div class="app-mid-top">
                <span>+86</span>
                <input type="text" placeholder="手机号" v-model="phone">
            </div>
            <div class="app-mid-bottom">
                <input type="text" placeholder="请输入4位验证码" v-model="code">
                <span>发送验证码</span>
            </div>
        </div>
        <!-- app-bottom -->
        <div class="app-bottom">
            <button v-on:click="haddleClick">确定</button>
        </div>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        let vm=new Vue({
            el:"#app",
            data:{
                phone:"",
                code:""
            },
            methods:{
                haddleClick:function(){
                    let phone=this.phone;
                    let code=this.code;
                    if(!!phone&&!!code){
                        alert("提交");
                    }else{
                        alert("手机号或者验证码不能为空");
                    }

                }


            }




        })





    </script>






</body>
</html>